<ul class="menu">
    <% permitted_to? :read, :admin_admin do %>
      <li class="first"><%= link_to raw("<span>Úvod</span>"), admin_path, ({:class => "active"} if current_page?(:controller => "admin")) %></li>
    <% end %>
    <% permitted_to? :read, :admin_orders do %>
      <li><%= link_to raw("<span>Objednávky</span>"), admin_orders_path, ({:class => "active"} if in_url("objednavky")) %>
        <%= render :partial => "admin/orders/submenu" if in_url("objednavky") rescue nil %>
      </li>
    <% end %>
    <% permitted_to? :read, :admin_order_user_infos do %>
      <li><%= link_to raw("<span>Zákazníci</span>"), admin_order_user_infos_path, ({:class => "active"} if in_url("zakaznici")) %>
        <%= render :partial => "admin/user_infos/submenu" if in_url("zakaznici") rescue nil %>
      </li>
    <% end %>
    <% permitted_to? :read, :admin_products do %>
      <li><%= link_to raw("<span>Výrobky</span>"), admin_products_path, ({:class => "active"} if in_url("vyrobky")) %>
        <%= render :partial => "admin/products/submenu" if in_url("vyrobky") %>
      </li>
    <% end %>
    <% permitted_to? :read, :admin_categories do %>
      <li><%= link_to raw("<span>Kategorie</span>"), admin_category_groups_path, ({:class => "active"} if in_url("skupina-kategorii")) %>
        <%= render :partial => "admin/categories/submenu" if in_url("skupina-kategorii") rescue nil %>
      </li>
    <% end %>
    <% permitted_to? :read, :admin_settings do %>
      <li><%= link_to raw("<span>Nastavení</span>"), admin_setting_path, ({:class => "active"} if in_url("nastaveni")) %>
        <%= render :partial => "admin/settings/submenu" if in_url("nastaveni") %>
      </li>
    <% end %>
</ul>